<!--<?php
print <<<EOT
-->

<script src="css/edit.js"></script>
<script>
<!--

function validate(form) {
    var id_ary = $js_id_ary_str;
    for (var i=0; i<id_ary.length; i++) {
        if (document.all('cart_qty['+id_ary[i]+']').value>document.all('inventory_qty['+id_ary[i]+']').value) {
            //alert('Your input number \''+document.all('cart_qty['+id_ary[i]+']').value+'\' ');
            alert('The number you enter \''+document.all('cart_qty['+id_ary[i]+']').value+'\' is more than the available quantity.');
            return false;
        }
    }

    return ture;
}
//CartItem ID Array
var cartItemIDAry = null;
//-->
</script>

 <div class="main_R" style="overflow:hidden; vertical-align:top; width:745px;"> 
 
  <div class="tb-top-logo">
    <img src="css/images/about_jansen_furniture.jpg" alt="" />
       </div>
              <div class="right-pad">
 
 
                  <table width="745" border="0" cellspacing="0" cellpadding="0" >                   
                    <tr>
                      <td width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>
                                       
                      <td bgcolor="FFFFFF" class="text" align="left" valign="top">
                       
               

<!--
EOT;
if (count($info_ary) == 0) {
print <<<EOT
--> 			        	
					   <div class="titles"><!--Sorry Your Container is Empty!
					   Please browse through the various product sections and add the desired items to your cart with the 'Add to container' button on the product detail page.
-->
对不起，你的购物车内没有货品！</div>
<br/>
请浏览产品种类，挑选货品输入数量然后按“加到购物车”键加进购物车内。
<!--
EOT;
} else {
print <<<EOT
--> 

			        	<form action="cart_view.php" method="post" name="form1"  onSubmit="return validate(this)">
			        	<input type="hidden" name="act" value="change">
			    		<table width="740" border="0" cellspacing="0" cellpadding="0" align="center">			    		
			    		<tr>
			    		<td colspan=11>
        			      <table  border="0" cellspacing="0" cellpadding="0">        			    	
        			        <tr><td  ><strong>顾客</strong> :</td>
							<td align="left" >&nbsp;{$user_info_ary['firstname']} {$user_info_ary['lastname']}</td></tr>
			    		    <tr><td ><strong>城市</strong> :</td><td align="left" >&nbsp;{$user_info_ary['city']}</td></tr>
			    		    <tr><td ><strong>国家</strong> :</td><td align="left" >&nbsp;{$COUNTRY_ARY[$user_info_ary['countryid']]}</td></tr>
			    		  </table>
			    		</td>
			    		</tr>  
			    		<tr><td colspan=11 height=5></td></tr>	
			    		<tr><td colspan=11 bgcolor="#000000" height=1></td></tr>															
						<tr class="cartAlternatingRowB">
			    			<td align="center" valign="middle" class="cartHeading" width="45"></td>
			    			<td align="left" ></td>
			    			<td align="left" valign="middle" class="cartHeading" width="50">产品型号</td>
			    			<td align="left" valign="middle" class="cartHeading" width="140">明细</td>
			    			<td align="left" valign="middle" class="cartHeading" width="90">漆色</td>
			    			<td align="right" valign="middle" class="cartHeading" width="40">立方米</td>
			    			<td align="right" valign="middle" class="cartHeading" width="42">立方尺</td>
			    			
			    			<td align="right" valign="middle" class="cartHeading" width="55">价格<br>{$money_type}</td>
							<!--<td align="right" valign="middle" class="cartHeading" width="55"></td>-->
			    			<td align="right" valign="middle" class="cartHeading" width="40">数量</td>
			    			<td align="right" valign="middle" class="cartHeading" width="60">总计<br>{$money_type}</td>
						<!--	<td align="right" valign="middle" class="cartHeading" width="60"></td>-->
			    			<td  align="center" valign="middle" class="cartHeading" width="60" height="30">减掉</td>
						</tr>
						<tr><td colspan=11 bgcolor="#A5AAB0" height=1></td></tr>
						
						<tr><td colspan=11 bgcolor="#FFFFFF" height=4></td></tr>
			
<!--
EOT;

foreach ($index_ary as $v) {    
	$v['price']  = number_format($v['price'], 2, '.', ',');
	$v['cost']   = number_format($v['cost'], 2, '.', ',');
	$v['cbm']    = number_format($v['cbm'], 2, '.', ',');
	$v['cuft']   = number_format($v['cuft'], 2, '.', ',');	
	$vname="";
	
	if(trim($v['namezh'])!="")
	  $vnamet=$v['namezh'];
	else
	 $vnamet=$v['name'];

		
print <<<EOT
-->
			            <tr class="cartAlternatingRowB1" height=45>
			    			<td align="center" valign="top" width="45"><a href="product_details.php?pid={$v['pid']}#atpic"><img src="attachments/{$v['small_pic']}" border="0" class="picture" width="40" height="40"></a></td>
			    			<td align="left" width="8"></td>
			    			<td align="left" valign="middle" width="50">{$v['code']}</td>
			    			<!--<td align="left" valign="top" width="148" class="cartmiddle"><span class="cartmiddle2">{$v['name']}</span></td>-->
							<td align="left" valign="top" width="140" class="cartmiddle"><span class="cartmiddle2">{$vnamet}</span></td>
			    			<td align="left" valign="middle" width="90"><!--{$_finish_item[$v['fitemid']]}--><select style="width: 100px; height:17px; padding:0; margin:0;" id="selFinish[{$v['old_k']}]" name="selFinish[{$v['old_k']}]">
 <!--
EOT;
$vname = "_finishAry_".$v["finish_id"];
foreach (${$vname} as $v2) {    		
		if($v2["id"] == $v["fitemid"])
		    $selected = " selected";
		else 
		    $selected = "";		   
print <<<EOT
-->
    <option value='{$v2["id"]}' {$selected}>{$v2["name"]}</option>
 <!--
EOT;
} 
print <<<EOT
--> 			    			
			    			</select><input type="hidden" name="fitemid[{$v['old_k']}]" value="{$v['fitemid']}" size="3"></td>
			    			<td align="right" valign="middle" width="40">{$v['cbm']}</td>
			    			<td align="right" valign="middle" width="42">{$v['cuft']}</td>
			    			<td align="right" valign="middle" width="55">{$v['price']} </td>
							<!--<td align="right" valign="middle" width="55"> </td>-->
			    			<td align="right" valign="middle" width="40"><input type="text" name="cart_qty[{$v['old_k']}]" value="{$v['count']}" size="3"></td>
			    			{$v['js_str']}
			    			<td align="right" valign="middle" width="60">{$v['cost']}</td>
							<!--<td align="right" valign="middle" width="60"></td>-->
			    			<td align="center" valign="middle" width="60" height="30">
			    			<a onclick="return confirm('是否确认减掉 {$vnamet} ?')" href="cart_view.php?act=delone&pid={$v['intype']}_{$v['pid']}_{$v['fitemid']}"  onmouseover="jf_button_remove_{$v['pid']}.src='./images/button/bt_delete.gif'" onmouseout="jf_button_remove_{$v['pid']}.src='./images/button/bt_delete.gif'" ><img src="./images/button/bt_delete.gif" alt="Remove This Item From Your Container" name="jf_button_remove_01" width="26" height="14" border="0" id="jf_button_remove_{$v['pid']}"></a>
			    			</td>
						</tr>

<!--
EOT;
} 

print <<<EOT
--> 
						<tr><td colspan=11 bgcolor="#A5AAB0" height=1></td></tr>
						
						
						<tr>
						    <td colspan=5 height=25 align="right"><strong>总计&nbsp;</strong> :</td>
			    			
			    			<td align="right" valign="middle"><div class="kk">{$total_cbm} </div></td>
			    			<td align="right" valign="middle"><div class="kk">&nbsp;{$total_cuft} </div></td>
			    			<td align="right" valign="middle"></td>
			    			<td align="right" valign="middle"><div class="kk">{$total_qty2} </div></td>
			    			
			    			
			    			
			    			<td align="right"><div class="kk">$total_cost </div></td>	
			    			<td></td>	  	    			
						
						
						 
						</tr>
						
						
						<tr><td colspan=11 bgcolor="#000000" height=1></td></tr>
						<tr><td colspan=11 height=28 align="right" valign="middle">
						
                              
						
						<a href="javascript:;" onClick="MM_openBrWindow('printer.php?page=cart_view','printerfriendly','scrollbars=yes,width=750,height=500')" onMouseOver="MM_swapImage('jf_button_printer_friendly','','./images/button/jf_button_print-over.gif',1)" onMouseOut="MM_swapImgRestore()">
                        <img src="./images/button/jf_button_print.gif" alt="Printer Friendly" name="jf_button_printer_friendly" width="90" height="20" border="0"  align="absmiddle" id="jf_button_printer_friendly">
                        </a>
						
                        <input type="image" onMouseOver="MM_swapImage('cart_update','','./images/button/jf_button_update_quantities-over.gif',1)" onMouseOut="MM_swapImgRestore()" src="./images/button/jf_button_update_quantities.gif" alt="Update" name="cart_update" width="90" height="20" border="0" id="cart_update" align="absmiddle">
						
                        
						<A onmouseover="cart_checkout.src='./images/button/jf_button_submit_order-over.gif'" onmouseout="cart_checkout.src='./images/button/jf_button_submit_order.gif'" href="cart_submit.php">
						<IMG id="cart_checkout" alt="Checkout" src="./images/button/jf_button_submit_order.gif" width=90 border=0 align="absmiddle">
						</A>
						
						</td></tr>
						</table></form>
						
<!--
EOT;
}
print <<<EOT
--> 


                      
                      </td>
                                      
                    
                    </tr>

<!--
EOT;
if (count($info_ary) > 0) {
print <<<EOT
-->                    
                    
                    <tr>
                        <td colspan="2" height="30"></td>
                    </tr>
                    <tr>
                      <td width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>                   
                      <td bgcolor="FFFFFF" colspan=1>
					  <table>
					  <tr>
					   <td><strong>请注意 : </strong></td>
					   <td width="5"></td>
					   <td>提交订单后， 购物车将会清空。 <br/></td>
					  </tr>
					   <tr>
					   <td></td>
					   <td></td>
					   <td>假如还没完成订单， 可以<a href="javascript:;" onClick="MM_openBrWindow('printer.php?page=cart_view','printerfriendly','scrollbars=yes,width=750,height=500')" onMouseOver="MM_swapImage('jf_button_printer_friendly','','./images/button/jf_button_print-over.gif',1)" onMouseOut="MM_swapImgRestore()">列印</a>出来。
					   </td>
					  </tr>
					  </table>					   
					   
					   </td>                   
                      
                    </tr>
                    
<!--
EOT;
}
print <<<EOT
--> 
                   
                   
                    
                   </table>   
                  
                </div>
           
       </div>              
   	</div>
<!--
EOT;
?>-->